import {Component} from 'react';
import {NavLink} from "react-router-dom";
import "./index.scss"

class RouteLink extends Component {
  render() {
    // 标签体内容会传到 props的 children 里
    return (
      <NavLink
        className={({isActive}) => isActive ? 'tab tab-active' : 'tab'}
        {...this.props}
      />
    );
  }
}

export default RouteLink;
